@extends('admin/index')
@section('name')
    <h1><span class="label label-default"> 角色权限  </span></h1>
    <hr>

    <div class="container">
        <div class="row">
            <div class="col-md-4 col-md-offset-4">
                <form class="form-horizontal" action="{{url('/role/upd')}}" method="post">
                    {{  csrf_field() }}
                    @foreach($data as $v)
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">角色</label>
                            <div class="col-sm-10">
                                <b class="form-control" >{{$v['or_name']}}</b>
                            </div>
                        </div>
                    @endforeach
                    <div class="form-group">
                        <label for="inputPassword3" class="col-sm-2 control-label">权限</label>
                        <div class="col-sm-10">
                            @foreach($permiss as $v)
                                <label class="checkbox-inline">
                                    <b>{{$v->per_name}}</b>
                                    {{--<input type="checkbox" name="per_name[]" value="{{$v->id}}"--}}
                                    @foreach($li as $a)
                                        @foreach($a as $b => $c)
                                            @if("{{$c}}" == "{{$v->per_name}}")
                                                <b style="color: red"> √ </b>
                                            @endif
                                        @endforeach
                                    @endforeach
                                    {{--{{$v->per_name}}--}}
                                </label>
                            @endforeach
                        </div>
                    </div>
                    @foreach($data as $v)
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 control-label">状态</label>
                            <div class="col-sm-10">
                                <label class="radio-inline">
                                    <b>禁用</b>
                                    @if($v['start'] == 0)
                                    <b style="color: red"> √ </b>
                                    @else
                                    @endif

                                </label>
                                <label class="radio-inline">
                                    <b>启用</b>
                                   @if($v['start'] == 1)
                                   <b style="color: red"> √ </b>
                                   @else
                                   @endif

                                </label>
                            </div>
                        </div>
                    @endforeach

                </form>
            </div>
        </div>
    </div>

@endsection

